home *** CD-ROM | disk | FTP | other *** search
/ The Netter Presenter: Ur…ion in Overactive Bladder / The Netter Presenter: Urinary System - Structure & Function in Overactive Bladder.iso / mac / UrinarySystem.app / Contents / Main.dxr / Internal_148_Button Toggle.ls < prev    next >
Encoding:
Text File  |  2005-01-18  |  1.4 KB  |  58 lines

  1. property OFFstate, ONstate, NormalState, outcurs, incurs, incursSet, customImage, useCustom, customMask, oldcursor
  2. global gTheONstate
  3.  
  4. on translate_cursor me, Setting, image, mask, Custom
  5.   val = [member(image), member(mask)]
  6.   return val
  7.   return Setting
  8. end
  9.  
  10. on beginSprite me
  11.   oldcursor = member("point")
  12.   val = translate_cursor(me, me.incursSet, "point", "point mask", 1)
  13.   set the cursor of sprite the spriteNum of me to val
  14.   memref = the member of sprite the currentSpriteNum
  15.   castLibNum = memref.castLibNum
  16.   NormalState = member(member(memref).memberNum, castLibNum)
  17.   DownState = member(member(memref).memberNum + 1, castLibNum)
  18.   OFFstate = member(member(memref).memberNum, castLibNum)
  19.   ONstate = member(member(memref).memberNum + 1, castLibNum)
  20.   gTheONstate = 0
  21. end
  22.  
  23. on endSprite me
  24.   oldcursor = member("point")
  25. end
  26.  
  27. on SetOFFstate me
  28.   set the member of sprite the spriteNum of me to me.OFFstate
  29.   gTheONstate = 0
  30. end
  31.  
  32. on SetONstate me
  33.   set the member of sprite the spriteNum of me to me.ONstate
  34.   gTheONstate = 1
  35. end
  36.  
  37. on mouseUp me
  38.   if the member of sprite me.spriteNum = me.ONstate then
  39.     set the member of sprite the spriteNum of me to me.OFFstate
  40.     gTheONstate = 0
  41.   else
  42.     set the member of sprite the spriteNum of me to me.ONstate
  43.     gTheONstate = 1
  44.   end if
  45. end
  46.  
  47. on mouseEnter me
  48. end
  49.  
  50. on mouseLeave me
  51. end
  52.  
  53. on mouseDown me
  54. end
  55.  
  56. on mouseUpOutSide me
  57. end
  58.